package com.ncucoder.dpt.observer;

/**
 * @author <a href="https://edit.ncucoder.com">hsowan</a>
 * @since 2018-12-20 20:25
 */
public class HexaObserver extends Observer {
    public HexaObserver(Subject subject){
        this.subject = subject;
        this.subject.attach(this);
    }

    @Override
    public void update() {
        System.out.println( "Hex String: "
                + Integer.toHexString( subject.getState() ).toUpperCase() );
    }
}
